Repository navigation
fix(fleet): resolve the pm-metadata conformance fixture in the derivation layout (#13617) - #13626
Merged
Merged
Conversation
…tion layout (#13617) The gh_metadata conformance test built the fixture path as CARGO_MANIFEST_DIR + /../../../../doc/..., which only resolves in a full checkout (pkgs/fleet/crates/fleet -> repo root). In the fleet-smoke derivation the crate sits at fleet/crates/fleet under a source whose fleetSrc fileset carries no doc/ at all, so the test panicked on a missing fixture and the fleet variant build step failed on main. The test now resolves the fixture by the PM_METADATA_V1_FIXTURE override, else by the nearest ancestor of the crate dir carrying doc/.../pm-metadata-v1.json, and still panics loudly when neither finds it — the fixture set stays the enforced conformance oracle. pkgs/fleet/default.nix sets PM_METADATA_V1_FIXTURE in the build env to a store copy of the fixture. Verified: the focused test passes in a real checkout, in a simulated derivation layout with the override set, and in the simulated layout with doc/ as a sibling; without either it fails with the explicit not-found panic.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 50 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #13617 — the fleet-smoke
Build the four fleet variant outputsstep failing on main (runs 45230909797, 45233191304).Root cause (verified first-hand):
pm_metadata_version_conformance_fixturesbuilt the fixture path asCARGO_MANIFEST_DIR + /../../../../doc/…, which resolves only in a full checkout (pkgs/fleet/crates/fleet→ repo root). In the derivation the crate sits atfleet/crates/fleetunder a source whosefleetSrcfileset (pkgs/fleet/default.nix) carries nodoc/at all — the path overshoots to/build/doc/…and the fixture is absent twice over. Distinct from #11834 (different test, different error), as the issue notes.Fix (narrow, fixture stays enforced):
PM_METADATA_V1_FIXTUREoverride, else the nearest ancestor of the crate dir carryingdoc/…/pm-metadata-v1.json. When neither finds it, it panics with an explicit not-found message — absence is still a loud failure, never a skip.pkgs/fleet/default.nixsetsPM_METADATA_V1_FIXTUREin the build env (envAttrs, all variants) to a store copy of the fixture file.Verification (focused test, laptop runs):
fleetSrcfileset:fleet/+atlas-searchbits, nodoc/), no override: fails with the explicitconformance fixture set not found … PM_METADATA_V1_FIXTURE is unsetpanic — enforcement intact.PM_METADATA_V1_FIXTUREset (what the derivation now does): pass.doc/as a sibling offleet/: pass via ancestor search.cargo fmt --checkdiffs in the file are pre-existing drift in untouched code);default.nixparses.The post-merge fleet-smoke run on main is the final verification; its result will be recorded on #13617 before the issue is closed.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.